"""author: wenyao
   data: 2021/10/28
   project: cjh
"""
# import math
# a = int(input())
# b = int(input())
# c = int(input())
# if a+b>c and a+c>b and b+c>a and a>0 and b>0 and c>0:
#     p = (a + b + c) / 2
#     result = math.sqrt(p * (p - a) * (p - b) * (p - c))
#     print(result)
# else:
#     print("错误")

#if嵌套
# import math
# a = int(input())
# b = int(input())
# c = int(input())
# if  a>0 and b>0 and c>0:
#     if a+b>c and a+c>b and b+c>a:
#         p = (a + b + c) / 2
#         result = math.sqrt(p * (p - a) * (p - b) * (p - c))
#         print(result)
#     else:
#         print("两边之和小于等于第三边")
# else:
#     print("边长小于等于0")

#if ... elif ..else..
# age = int(input("please input your age:"))
# if 0<age <18:
#     print("青少年")
# elif 18<=age<45:
#     print("青中年")
# elif 45<=age<140:
#     print("老年")
# else:
#     print("输入不合法")

#if的三元运算
# >>> num1 = 1
# >>> print("赢了") if num1 == 1 else print("输了")
# 赢了
# >>> str1 = "abcddd"
# >>> result = "ok" if str1.startswith("abc") else "error"
# >>> result
# 'ok'

#################循环语句
######for
# str1 = input("please input a  str:")
# result = ""
# for i in str1:
#     if i.isupper():
#         result += "1"
#     else:
#         result += "0"
# print(result)

# for i in str1:
#     if i.isupper():
#         print("1",end="")
#     else:
#         print("0",end="")

#break  continue
#break 结束当前循环
#continue 结束本次循环，开启下一次循环
# n=4
# for j in range(n):
#     for i in range(n):
#         if i == 1:
#             #break
#             continue
#         print(j,i)

#字符串
#找到出现次数最多的字符
# str1 = "lswfowie0lskdfowejfaskfjaaaaaaaaasdkjfeissssssssssssss"
# #定义两个变量去存储出现字符和次数
# tmp_str=""
# max_num = 0
# for i in str1:
#     if str1.count(i)> max_num:
#         max_num = str1.count(i)
#         tmp_str = i
# print(tmp_str, max_num)

##
#用户登陆
# for i in range(3):
#     username = input("请输入用户名：")
#     passwd=input("请输入密码：")
#     if username=='root'and passwd=='123456' :
#         print("登录成功！")
#         break
#     elif i==2:
#         pass    #占位符，表示什么都不做
#         #print("密码错误！没有机会了！")
#     else :
#         print("密码错误！你还剩",2-i,"次机会")
# else:
#     print("登陆失败！")

# for i in range(3):
#     print(i)
#     if i ==1 :
#         break
# else:                         #for循环全部执行完了，正常退出了，这个时候才会执行else的内容
#     print("ok")



##
#猜数字
# num1=18
# for i in range(3):
#     guess=int(input("请猜一个数字吧："))
#
#     if guess==18:
#         print("太厉害了！正确答案就是",guess)
#         break
#     elif i == 2:
#         print("机会耗尽，没猜对，你输了，正确答案是：", num1)
#     elif guess>num1 :
#         print("你输入的数字太大了，再猜一次吧")
#     elif guess<num1 :
#         print("你输入的数字太小了，再猜一次吧")
#

# str1 = "123"
# if not str1.isdigt():
#     print("xxx")
#
# for i in range(3):
#     i="a"
#     print(i)

#while
# i = 1
# while i <5:
#     i += 1
#     print("ok",i)

#1、给定一个整数，然后将它转为千分位格式化
#   123452345  -- 》 123,452,345   不要使用format
#2、实现九九乘法表输出